<script setup>

import Login from './Login.vue';
import Register from './Register.vue';

// 引入库存
import { useLoginStore } from '@/stores/login/loginStore.ts'
// 创建库存实例
const loginStore = useLoginStore();

</script>

<template>
    <div class="bg">
        <el-row class="login-page">
            <el-col :span="6" :offset="0" class="form">
                <Login v-if="loginStore.isLogin" />
                <Register v-if="loginStore.isRegister" />
            </el-col>
        </el-row>

    </div>
</template>

<style lang="scss" scoped>
/* 背景图片 */
.bg {
    background-image: url('@/assets/login-bg.png');
    background-repeat: no-repeat;
    /* 不重复背景图 */
    background-size: cover;
    /* 覆盖整个页面 */
    height: 100vh;
    /* 全屏高度 */
    width: 100vw;
    /* 全屏宽度 */
    position: fixed;
    /* 固定位置 */
    top: 0;
    left: 0;
    z-index: -1;
}

/* 样式 */
.login-page {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
</style>